/**
 * @author lscl
 * @version 1.0
 * @intro:
 */

public class Demo06_方法的重载 {

    public static void main(String[] args) {

       /* int sum = getSum(10, 20);
        System.out.println("sum: " + sum);

        System.out.println("-------------------");

        double doubleSum=getSum(20.5D,0.5D);
        System.out.println("doubleSum: " + doubleSum);*/


        getSum(10.0D,20.0D);
    }

    /*
     方法的重载
        1) 方法名必须一样
        2) 参数列表要不一样
     */

    // 计算两个double数的和
    public static double getSum(double a,double b){

        System.out.println("aaaaaaaaaaaaaaa");
        return a+b;
    }


    // 计算两个int数的和
    public static int getSum(int a, int b) {

        System.out.println("bbbbbbbb");
        return a + b;
    }
}
